package logic

import (
	"context"
	"member_srv/model/mysql"

	"member_srv/internal/svc"
	"member_srv/member"

	"github.com/zeromicro/go-zero/core/logx"
)

type ListMemberLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewListMemberLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListMemberLogic {
	return &ListMemberLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *ListMemberLogic) ListMember(in *member.ListMemberRequest) (*member.ListMemberResponse, error) {
	m := mysql.Member{}
	err := m.ListMember(in.Types)
	if err != nil {
		logx.Error("被封禁:", err)
		return nil, err
	}

	return &member.ListMemberResponse{}, nil
}
